/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    /* make transparent link selection, adjust last value opacity 0 to 1.0 */
}

html {
    height: 100%;
    width: 100%;
}

body {
    -webkit-touch-callout: none;
    /* prevent callout to copy image, etc when tap to hold */
    -webkit-text-size-adjust: none;
    /* prevent webkit from resizing text to fit */
    -webkit-user-select: none;
    /* prevent copy paste, to allow, change 'none' to 'text' */
    background-color: #E4E4E4;
    font-family: 'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif;
    font-size: 12px;
    height: 100%;
    margin: 0px;
    padding: 0px;
    width: 100%;
    overflow: hidden;
}

/* Landscape layout (with min-width) */

@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
    #app {
        background-position: left center;
        padding: 75px 0px 75px 170px;
        /* padding-top + padding-bottom + text area = image height */
        margin: -90px 0px 0px -198px;
        overflow: hidden;
        /* offset vertical: half of image height */
        /* offset horizontal: half of image width and text area width */
    }
}

#app {
    overflow: hidden;
    width: 100%;
    height: 100%;
}

dropdown {
    display: none;
}

h1 {
    font-size: 24px;
    font-weight: normal;
    margin: 0px;
    overflow: visible;
    padding: 0px;
    text-align: center;
}

.event {
    border-radius: 4px;
    -webkit-border-radius: 4px;
    color: #FFFFFF;
    font-size: 12px;
    padding: 2px 0px;
    background-color: #4B946A;
    max-width: 100%;
    margin: 0;
    word-wrap: break-word;
}

.event.listening {
    background-color: #333333;
    display: block;
}

.event.received {
    background-color: #4B946A;
    display: none;
}

@keyframes fade {
    from {
        opacity: 1.0;
    }
    50% {
        opacity: 0.4;
    }
    to {
        opacity: 1.0;
    }
}

@-webkit-keyframes fade {
    from {
        opacity: 1.0;
    }
    50% {
        opacity: 0.4;
    }
    to {
        opacity: 1.0;
    }
}

.blink {
    animation: fade 3000ms infinite;
    -webkit-animation: fade 3000ms infinite;
}

#log {
    background-color: red;
    float: right;
    margin-top: 80px;
}

#deviceready {
    bottom: 20px;
    position: absolute;
    max-width: 85%;
}

#mainDropdown {
    position: absolute;
    top: 5px;
    right: 5px;
}

#mainMenu {
    display: block;
    width: 100px;
    padding: 3px;
}

#mainMenu li {
    margin: 5px;
    display: block;
    text-align: center;
}

#mainMenu li:hover {
    background-color: #ddd;
}

#mainMenu li>svg {
    height: 55px;
    width: 55px;
}

#app .fullScreen {
    height: 100%;
    width: 100%;
    position: absolute;
    /* position in the center of the screen */
    left: 0;
    top: 0;
    background-color: white;
}

#loading {
    height: 100%;
    width: 100%;
    background-color: #4B946A;
    top: 0;
    left: 0;
    position: absolute;
}

.backToMain {
    width: 25px;
    height: 25px;
    display: block;
}

.device {
    display: block;
    width: 100%;
}

.device>.name {
    font-size: 20px;
    font-weight: bold;
    margin-right: 20px;
}

.device .deviceState {
    display: inline-block;
    height: 20px;
    width: 20px;
    font-size: 40px;
    vertical-align: text-top;
    line-height: 14px;
    margin-left: 5px;
}

.device .deviceState .connectionErrorDevice {
    font-size: 16px;
    vertical-align: text-bottom;
    line-height: auto;
}

#keyboard {
    height: 100%;
    width: 100%;
}

#keyboard>.keyboardContent {
    width: 100%;
    height: 100%;
    text-align: left;
    position: absolute;
}

#keyboard>.keyboardContent.portrait {
    /*background-size: auto 100%;*/
    background-repeat: no-repeat;
    background-position: top left;
}

.keyboardContent .keyboardLayout {
    position: absolute;
    min-width: 100px;
    min-height: 100px;
    background-color: #FF000033;
}

.keyboardContent>img.bg {
    position: absolute;
    max-width: 100%;
    max-height: 100%;
}

.keyboardContent.portrait>.keyboardLayout,
.keyboardContent.portrait>img.bg {
    top: 0;
    left: 0;
    height: 100%;
}

.keyboardContent.landscape>.keyboardLayout,
.keyboardContent.landscape>img.bg {
    bottom: 0;
    right: 0;
    width: 100%;
}

#keyboard>.keyboardContent.landscape {
    /*background-size: 100% auto;*/
    background-position: bottom right;
    background-repeat: no-repeat;
}

.button {
    display: block;
    position: absolute;
    text-align: center;
}

.showHelp .button,
.showHelp.button {
    background-color: rgba(0, 255, 255, 0.3);
}

#InputIpWarp {
}

#InputedIP {
    width: 70%;
    margin-left: 0;
    margin-right: 0;
    border-left: 0;
    border-right: 0;
    padding-left: 0;
    padding-right: 0;
}

#UseInputIP {
    width: 15%;
    margin-left: 0;
    margin-right: 0;
    border-left: 0;
    border-right: 0;
    padding-left: 0;
    padding-right: 0;
}